﻿/*  CamHelper (See http://camhelper.codeplex.com/ or https://bitbucket.org/AndiKS/camhelper for more Info)
    Copyright (C) 2011 Andreas Wimmer

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

using System;
using System.Windows.Forms;
using CamHelper.Command;

namespace CamHelper
{
    static class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            var title = String.Format("CamHelper {0}", Application.ProductVersion);
            Console.Title = title;
            Console.WriteLine(title);
            Console.WriteLine("Copyright (C) 2011 Andreas Wimmer");
            Console.WriteLine("(See camhelper.codeplex.com or bitbucket.org/AndiKS/camhelper for more Info)");
            Console.WriteLine("");
            Console.WriteLine("This program is free software: you can redistribute it and/or modify");
            Console.WriteLine("it under the terms of the GNU General Public License as published by");
            Console.WriteLine("the Free Software Foundation, either version 3 of the License, or");
            Console.WriteLine("(at your option) any later version.");
            Console.WriteLine("");
            Console.WriteLine("This program is distributed in the hope that it will be useful,");
            Console.WriteLine("but WITHOUT ANY WARRANTY; without even the implied warranty of");
            Console.WriteLine("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the");
            Console.WriteLine("GNU General Public License for more details.");
            Console.WriteLine("");
            Console.WriteLine("You should have received a copy of the GNU General Public License");
            Console.WriteLine("along with this program.  If not, see <http://www.gnu.org/licenses/>.");
            Console.WriteLine("");
            Console.WriteLine(new String('=', Console.WindowWidth));
            Console.WriteLine("");

            if (args.Length > 0 && args[0].Length > 0)
                CommandFactory.RunCommand(args[0]);
            else
                CommandFactory.ShowCommands();

#if DEBUG
            Console.ReadLine();
#endif
        }
    }
}
